import { IsNotEmpty, IsNumber } from 'class-validator';
import { LessonsSort } from '../../lessons-sort/entities/lessons-sort.entity';
import { ApiProperty } from '@nestjs/swagger';
export class CreateStudentCourseDto {
  @ApiProperty({ example: '1', description: '学生id' })
  @IsNumber()
  @IsNotEmpty({ groups: ['create'], message: '学生id' })
  student_id: number;

  @ApiProperty({ example: '1', description: '课程id' })
  @IsNumber()
  @IsNotEmpty({ groups: ['create'], message: '请选择课程' })
  lessonsSortId: number;

  // @IsNumber(
  //   {
  //     allowNaN: false,
  //     allowInfinity: false,
  //   },
  //   { each: true },
  // )
  // @IsNotEmpty({ groups: ['create'], message: '请选择课程' })
  // lessonsSortIds: number[];

  lessonsSorts: LessonsSort[];
}
